
var jedis = require('redis');
var config = require('./config');

export default class RedisClient {

    constructor() {
       
        this.client = jedis.createClient(config.default.port, config.default.host);

        this.client.on('ready',function(res){
            console.log('ready');
        });
        
        this.client.on('end',function(err){
            console.log('end');
        });
        
        this.client.on('error', function (err) {
            console.log(err);
        });
        
        this.client.on('connect',function(){
            console.log('redis connect success!');
        });
    }

  
}